<template>
  <div class="panel" >
      <div class="panel-tabs">
        <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
          <el-tab-pane>
            <template #label>
              <span class="custom-tabs-label">
                <span>文件</span>
              </span>
            </template>
            <File />
          </el-tab-pane>
          <el-tab-pane>
            <template #label>
              <span class="custom-tabs-label">
                <el-icon></el-icon>
                <span>大纲</span>
              </span>
            </template>
             <DaGang />
          </el-tab-pane>
        </el-tabs>
          <!-- <button class="tab-button" :class="{ active: activeTab === 'class' }" @click="activeTab = 'class'">
              班级
          </button> -->
          <!-- <button  class="tab-button" :class="{ active: activeTab === 'files' }" @click="activeTab = 'files'">
              文件
          </button>
          <button   class="tab-button" :class="{ active: activeTab === 'outline' }" @click="activeTab = 'outline'">
              大纲
          </button> -->
      </div>

      <!-- <div class="panel-content">
          <div v-if="activeTab === 'class'">
              <Class />
          </div>
          <div v-if="activeTab === 'files'">
              <File />
          </div>
          <div v-if="activeTab === 'outline'">
              <DaGang />
          </div>
      </div> -->
  </div>
</template>

<script setup>
import { ref } from 'vue'
import File from '@/components/index-left/index-file/index.vue'
import DaGang from '@/components/index-left/index-dagang/index.vue'

const props = defineProps({
  width: {
    type: Number,
    required: true
  }
})

const emit = defineEmits(['resize-start', 'update:width'])

const activeTab = ref('files')
</script>

<style scoped>
/* .panel-tabs{
  position: absolute;
} */
.panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: width 0.3s ease;
  overflow: hidden;
  height: 100%;
  overflow-y: auto;
}

/* 标签内容大小 */
.custom-tabs-label > span {
  padding: 40px;
  color: #3a4a64;
  font-size: 20px;
  font-weight: 400;
}
.tab-button {
  flex: 1;
  padding: 8px 12px;
  background: #f5f5f5;
  border: none;
  border-right: 1px solid #ddd;
  cursor: pointer;
  outline: none;
}

.tab-button:last-child {
  border-right: none;
}

.tab-button.active {
  background: #fff;
  font-weight: bold;
  border-bottom: 2px solid #1890ff;
}


.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background-color: #dcdfe6;
  cursor: col-resize;
  z-index: 10;
}

.right-handle {
  right: 0;
}

.resize-handle:hover {
  background-color: #409eff;
}
</style>